package com.atguigu.tingshu.order.service;

import com.atguigu.tingshu.model.order.OrderInfo;
import com.atguigu.tingshu.vo.order.OrderInfoVo;
import com.atguigu.tingshu.vo.order.TradeVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * 订单信息服务
 *
 * @author ym
 * @date 2025/06/28 22:07
 */
public interface OrderInfoService extends IService<OrderInfo> {


    /**
     * 贸易
     *
     * @param tradeVo 贸易组织
     * @return {@link OrderInfoVo}
     */
    OrderInfoVo trade(Long userId, TradeVo tradeVo);

    Map<String, Object> submitOrder(Long userid, OrderInfoVo orderInfoVo);

    OrderInfo saveOrder(OrderInfoVo orderInfoVo, Long userId);

    OrderInfo getOrderInfo(Long userId, String orderNo);

    Page<OrderInfo> findUserPage(Long userId, Integer pageNum, Integer limit);

    void orderCancal(String orderNo);
}
